import QtQuick
import QtQuick.Controls

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("设置选择器")

    Column {
        anchors.centerIn: parent

        Text {
            text: "Volume"
            font.bold: true
            anchors.horizontalCenter: parent.horizontalCenter
        }

        Tumbler {
            id: volumeTumbler
            model: 11
            currentIndex: 5
            delegate: Text {
                text: index * 10
                horizontalAlignment: Text.AlignHCenter
                font.pixelSize: 14
                opacity: 0.4 + (1 - Math.abs(Tumbler.displacement)) * 0.6
            }
        }

        Text {
            text: "Current: " + (volumeTumbler.currentIndex * 10)
            anchors.horizontalCenter: parent.horizontalCenter
        }
    }
}
